package com.zmn.oms.third.jingdong.handler;

import com.alibaba.fastjson.JSON;
import com.jdwl.open.api.sdk.domain.lasim.ImServiceProviderExternalJsfSerivce.ImPendingOrderDto;
import com.jdwl.open.api.sdk.domain.lasim.ImServiceProviderExternalJsfSerivce.JosPage;
import com.jdwl.open.api.sdk.response.lasim.LasImHfsOrderSearchResponse;
import com.zmn.oms.third.jingdong.dto.api.PullOrderResult;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * 类描述：
 *
 * @author LiangHailong
 * @date 2019/09/05 19:58
 */
@Slf4j
public final class JdResponseHandler {

    /**
     * 解析京东API的拉取订单的Response，转换成通用的工单返回结果对象
     * @param response
     * @return
     */
    public static PullOrderResult parsePullOrderResponse(LasImHfsOrderSearchResponse response) {
        PullOrderResult result = new PullOrderResult(false);

        JosPage josPage = response.getResult();

        do {
            // 拉取失败
            if (100 != josPage.getErrorCode()) {
                result.setMsg(String.format("ErrorCode:[%d]，%s", josPage.getErrorCode(), josPage.getErrorMessage()));
                break;
            }

            // 拉取成功
            result.setSuccess(true);
            result.setMsg(josPage.getErrorMessage());
            result.setQueryCode(josPage.getCurrentQueryCode());
            result.setJdOrderDTOs(josPage.getContent());
        } while (false);

        return result;
    }

    public static void main(String[] args) {
        String str = "{\"msg\":\"{\\\"response\\\":{\\\"content\\\":{\\\"content\\\":[{\\\"branchlinePrice\\\":0,\\\"carrierReceiptedDate\\\":\\\"\\\",\\\"collectAddress\\\":\\\"\\\",\\\"collectCityCode\\\":\\\"\\\",\\\"collectCityName\\\":\\\"\\\",\\\"collectCode\\\":\\\"\\\",\\\"collectDistrictCode\\\":\\\"\\\",\\\"collectDistrictName\\\":\\\"\\\",\\\"collectPrice\\\":0,\\\"collectProvinceCode\\\":\\\"\\\",\\\"collectProvinceName\\\":\\\"\\\",\\\"collectTel\\\":\\\"\\\",\\\"collectTime\\\":0,\\\"collectTownCode\\\":\\\"\\\",\\\"collectTownName\\\":\\\"\\\",\\\"createOrderDate\\\":\\\"2020-08-29 13:39:39\\\",\\\"createTime\\\":1599621272000,\\\"customerAddress\\\":\\\"广东广州市白云区太和镇龙归镇永兴村龙兴中路张屋北15号502\\\",\\\"customerName\\\":\\\"张高峰\\\",\\\"customerTel\\\":\\\"13450210491\\\",\\\"deliverAddress\\\":\\\"\\\",\\\"deliverCityCode\\\":\\\"\\\",\\\"deliverCityName\\\":\\\"\\\",\\\"deliverDistrictCode\\\":\\\"\\\",\\\"deliverDistrictName\\\":\\\"\\\",\\\"deliverProvinceCode\\\":\\\"\\\",\\\"deliverProvinceName\\\":\\\"\\\",\\\"deliverTownCode\\\":\\\"\\\",\\\"deliverTownName\\\":\\\"\\\",\\\"deliveredDate\\\":\\\"\\\",\\\"deliveredFinishDate\\\":\\\"\\\",\\\"destinationCityCode\\\":\\\"\\\",\\\"destinationCityName\\\":\\\"\\\",\\\"destinationDistrictCode\\\":\\\"\\\",\\\"destinationDistrictName\\\":\\\"\\\",\\\"destinationProvinceCode\\\":\\\"\\\",\\\"destinationProvinceName\\\":\\\"\\\",\\\"destinationTownCode\\\":\\\"\\\",\\\"destinationTownName\\\":\\\"\\\",\\\"estimateReceiveTime\\\":0,\\\"expectAtHomeDate\\\":\\\"2020-08-30 00:00:00\\\",\\\"ikeaPackageInfo\\\":\\\"\\\",\\\"installPrice\\\":0,\\\"isCollect\\\":0,\\\"isPop\\\":0,\\\"isPull\\\":0,\\\"isVerification\\\":1,\\\"jdOrderNo\\\":\\\"125796178074\\\",\\\"logisticsStatus\\\":0,\\\"mainlinePrice\\\":0,\\\"merchantBizNo\\\":\\\"\\\",\\\"orderDetail\\\":\\\"[{\\\\\\\"serviceType\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\"isFreeInstall\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"isPostPay\\\\\\\":0,\\\\\\\"category1Name\\\\\\\":\\\\\\\"家用电器\\\\\\\",\\\\\\\"appointServiceItems\\\\\\\":[{\\\\\\\"serviceItemId\\\\\\\":6,\\\\\\\"serviceItemName\\\\\\\":\\\\\\\"上门维修\\\\\\\"}],\\\\\\\"expectAtHomeDate\\\\\\\":\\\\\\\"2020-08-30\\\\\\\",\\\\\\\"createOrderDate\\\\\\\":\\\\\\\"2020-08-29 13:39:39\\\\\\\",\\\\\\\"installPrice\\\\\\\":0,\\\\\\\"payType\\\\\\\":\\\\\\\"2\\\\\\\",\\\\\\\"isNeedInstall\\\\\\\":1,\\\\\\\"category3Name\\\\\\\":\\\\\\\"家电维修\\\\\\\",\\\\\\\"billStatus\\\\\\\":15,\\\\\\\"goodsName\\\\\\\":\\\\\\\"家用冰箱检测  家电检测 故障检测 家电清洗 上门服务 家政保洁\\\\\\\",\\\\\\\"brandNo\\\\\\\":\\\\\\\"9639\\\\\\\",\\\\\\\"height\\\\\\\":0,\\\\\\\"goodsNo\\\\\\\":\\\\\\\"6009949\\\\\\\",\\\\\\\"brandName\\\\\\\":\\\\\\\"京东\\\\\\\",\\\\\\\"sourceProductName\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"length\\\\\\\":0,\\\\\\\"installRemark\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"weight\\\\\\\":0,\\\\\\\"volume\\\\\\\":0,\\\\\\\"isPaid\\\\\\\":\\\\\\\"2\\\\\\\",\\\\\\\"goodsCount\\\\\\\":1,\\\\\\\"venderName\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"sourceProductSku\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"afterSalesHandleFlag\\\\\\\":2,\\\\\\\"venderNo\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"width\\\\\\\":0,\\\\\\\"category2Name\\\\\\\":\\\\\\\"家电服务\\\\\\\",\\\\\\\"serviceNo\\\\\\\":58819563}]\\\",\\\"orderFromType\\\":100,\\\"orderNo\\\":\\\"125796178074\\\",\\\"orderStatus\\\":3100,\\\"packageNum\\\":0,\\\"packageRemark\\\":\\\"\\\",\\\"popAddress\\\":\\\"\\\",\\\"popCode\\\":\\\"\\\",\\\"popContact\\\":\\\"\\\",\\\"popName\\\":\\\"\\\",\\\"popTel\\\":\\\"\\\",\\\"predictDeliverTimePeriod\\\":\\\"\\\",\\\"productBrandName\\\":\\\"\\\",\\\"productCategoryName\\\":\\\"\\\",\\\"productFirstCategoryName\\\":\\\"\\\",\\\"productSecondCategoryName\\\":\\\"\\\",\\\"pullRemark\\\":\\\"\\\",\\\"queryCode\\\":\\\"\\\",\\\"receiveCityCode\\\":\\\"1601\\\",\\\"receiveCityName\\\":\\\"广州市\\\",\\\"receiveDistrictCode\\\":\\\"50258\\\",\\\"receiveDistrictName\\\":\\\"白云区\\\",\\\"receiveProvinceCode\\\":\\\"19\\\",\\\"receiveProvinceName\\\":\\\"广东\\\",\\\"receiveTownCode\\\":\\\"50375\\\",\\\"receiveTownName\\\":\\\"太和镇\\\",\\\"rejectedDate\\\":\\\"\\\",\\\"remark\\\":\\\"\\\",\\\"salesPlatform\\\":0,\\\"salesPlatformName\\\":\\\"\\\",\\\"sendpay\\\":\\\"\\\",\\\"servicesScope\\\":1,\\\"siteAddress\\\":\\\"\\\",\\\"siteCode\\\":\\\"0238611947\\\",\\\"siteContact\\\":\\\"\\\",\\\"siteName\\\":\\\"啄木鸟维修\\\",\\\"siteTel\\\":\\\"\\\",\\\"sumPrice\\\":0,\\\"sumVolume\\\":0,\\\"updateTime\\\":1599621272000,\\\"uuid\\\":\\\"\\\",\\\"vouchererPrice\\\":0,\\\"websiteNo\\\":\\\"0238611947\\\"},{\\\"branchlinePrice\\\":0,\\\"carrierReceiptedDate\\\":\\\"\\\",\\\"collectAddress\\\":\\\"\\\",\\\"collectCityCode\\\":\\\"\\\",\\\"collectCityName\\\":\\\"\\\",\\\"collectCode\\\":\\\"\\\",\\\"collectDistrictCode\\\":\\\"\\\",\\\"collectDistrictName\\\":\\\"\\\",\\\"collectPrice\\\":0,\\\"collectProvinceCode\\\":\\\"\\\",\\\"collectProvinceName\\\":\\\"\\\",\\\"collectTel\\\":\\\"\\\",\\\"collectTime\\\":0,\\\"collectTownCode\\\":\\\"\\\",\\\"collectTownName\\\":\\\"\\\",\\\"createOrderDate\\\":\\\"2020-09-09 06:46:43\\\",\\\"createTime\\\":1599621289000,\\\"customerAddress\\\":\\\"河北石家庄市桥西区红旗街道滨河街滨河新城24-1-104\\\",\\\"customerName\\\":\\\"王蒙\\\",\\\"customerTel\\\":\\\"19903112543\\\",\\\"deliverAddress\\\":\\\"\\\",\\\"deliverCityCode\\\":\\\"\\\",\\\"deliverCityName\\\":\\\"\\\",\\\"deliverDistrictCode\\\":\\\"\\\",\\\"deliverDistrictName\\\":\\\"\\\",\\\"deliverProvinceCode\\\":\\\"\\\",\\\"deliverProvinceName\\\":\\\"\\\",\\\"deliverTownCode\\\":\\\"\\\",\\\"deliverTownName\\\":\\\"\\\",\\\"deliveredDate\\\":\\\"\\\",\\\"deliveredFinishDate\\\":\\\"\\\",\\\"destinationCityCode\\\":\\\"\\\",\\\"destinationCityName\\\":\\\"\\\",\\\"destinationDistrictCode\\\":\\\"\\\",\\\"destinationDistrictName\\\":\\\"\\\",\\\"destinationProvinceCode\\\":\\\"\\\",\\\"destinationProvinceName\\\":\\\"\\\",\\\"destinationTownCode\\\":\\\"\\\",\\\"destinationTownName\\\":\\\"\\\",\\\"estimateReceiveTime\\\":0,\\\"expectAtHomeDate\\\":\\\"2020-09-10 00:00:00\\\",\\\"ikeaPackageInfo\\\":\\\"\\\",\\\"installPrice\\\":0,\\\"isCollect\\\":0,\\\"isPop\\\":0,\\\"isPull\\\":0,\\\"isVerification\\\":1,\\\"jdOrderNo\\\":\\\"131791691043\\\",\\\"logisticsStatus\\\":0,\\\"mainlinePrice\\\":0,\\\"merchantBizNo\\\":\\\"\\\",\\\"orderDetail\\\":\\\"[{\\\\\\\"serviceType\\\\\\\":\\\\\\\"1\\\\\\\",\\\\\\\"isFreeInstall\\\\\\\":\\\\\\\"0\\\\\\\",\\\\\\\"isPostPay\\\\\\\":0,\\\\\\\"category1Name\\\\\\\":\\\\\\\"家用电器\\\\\\\",\\\\\\\"appointServiceItems\\\\\\\":[{\\\\\\\"serviceItemId\\\\\\\":6,\\\\\\\"serviceItemName\\\\\\\":\\\\\\\"上门维修\\\\\\\"}],\\\\\\\"expectAtHomeDate\\\\\\\":\\\\\\\"2020-09-10\\\\\\\",\\\\\\\"createOrderDate\\\\\\\":\\\\\\\"2020-09-09 06:46:43\\\\\\\",\\\\\\\"installPrice\\\\\\\":0,\\\\\\\"payType\\\\\\\":\\\\\\\"2\\\\\\\",\\\\\\\"isNeedInstall\\\\\\\":1,\\\\\\\"category3Name\\\\\\\":\\\\\\\"家电维修\\\\\\\",\\\\\\\"billStatus\\\\\\\":15,\\\\\\\"goodsName\\\\\\\":\\\\\\\"家用冰箱检测  家电检测 故障检测 家电清洗 上门服务 家政保洁\\\\\\\",\\\\\\\"brandNo\\\\\\\":\\\\\\\"9639\\\\\\\",\\\\\\\"height\\\\\\\":0,\\\\\\\"goodsNo\\\\\\\":\\\\\\\"6009949\\\\\\\",\\\\\\\"brandName\\\\\\\":\\\\\\\"京东\\\\\\\",\\\\\\\"sourceProductName\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"length\\\\\\\":0,\\\\\\\"installRemark\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"weight\\\\\\\":0,\\\\\\\"volume\\\\\\\":0,\\\\\\\"isPaid\\\\\\\":\\\\\\\"2\\\\\\\",\\\\\\\"goodsCount\\\\\\\":1,\\\\\\\"venderName\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"sourceProductSku\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"afterSalesHandleFlag\\\\\\\":1,\\\\\\\"venderNo\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"width\\\\\\\":0,\\\\\\\"category2Name\\\\\\\":\\\\\\\"家电服务\\\\\\\",\\\\\\\"serviceNo\\\\\\\":59126132}]\\\",\\\"orderFromType\\\":100,\\\"orderNo\\\":\\\"131791691043\\\",\\\"orderStatus\\\":3100,\\\"packageNum\\\":0,\\\"packageRemark\\\":\\\"\\\",\\\"popAddress\\\":\\\"\\\",\\\"popCode\\\":\\\"\\\",\\\"popContact\\\":\\\"\\\",\\\"popName\\\":\\\"\\\",\\\"popTel\\\":\\\"\\\",\\\"predictDeliverTimePeriod\\\":\\\"\\\",\\\"productBrandName\\\":\\\"\\\",\\\"productCategoryName\\\":\\\"\\\",\\\"productFirstCategoryName\\\":\\\"\\\",\\\"productSecondCategoryName\\\":\\\"\\\",\\\"pullRemark\\\":\\\"\\\",\\\"queryCode\\\":\\\"\\\",\\\"receiveCityCode\\\":\\\"142\\\",\\\"receiveCityName\\\":\\\"石家庄市\\\",\\\"receiveDistrictCode\\\":\\\"42544\\\",\\\"receiveDistrictName\\\":\\\"桥西区\\\",\\\"receiveProvinceCode\\\":\\\"5\\\",\\\"receiveProvinceName\\\":\\\"河北\\\",\\\"receiveTownCode\\\":\\\"60049\\\",\\\"receiveTownName\\\":\\\"红旗街道\\\",\\\"rejectedDate\\\":\\\"\\\",\\\"remark\\\":\\\"\\\",\\\"salesPlatform\\\":0,\\\"salesPlatformName\\\":\\\"\\\",\\\"sendpay\\\":\\\"\\\",\\\"servicesScope\\\":1,\\\"siteAddress\\\":\\\"\\\",\\\"siteCode\\\":\\\"0238611947\\\",\\\"siteContact\\\":\\\"\\\",\\\"siteName\\\":\\\"啄木鸟维修\\\",\\\"siteTel\\\":\\\"\\\",\\\"sumPrice\\\":0,\\\"sumVolume\\\":0,\\\"updateTime\\\":1599621289000,\\\"uuid\\\":\\\"\\\",\\\"vouchererPrice\\\":0,\\\"websiteNo\\\":\\\"0238611947\\\"}],\\\"currentQueryCode\\\":\\\"ES_IM_OP159962130048759\\\",\\\"errorCode\\\":100,\\\"errorMessage\\\":\\\"成功\\\",\\\"nextQueryCode\\\":\\\"\\\",\\\"numberOfContent\\\":2,\\\"pageSize\\\":2}, \\\"code\\\":0}}\",\"result\":{\"nextQueryCode\":\"\",\"errorMessage\":\"成功\",\"errorCode\":100,\"pageSize\":2,\"currentQueryCode\":\"ES_IM_OP159962130048759\",\"content\":[{\"receiveDistrictName\":\"白云区\",\"jdOrderNo\":\"125796178074\",\"destinationDistrictCode\":\"\",\"productCategoryName\":\"\",\"estimateReceiveTime\":0,\"servicesScope\":1,\"deliverAddress\":\"\",\"deliverCityName\":\"\",\"mainlinePrice\":0,\"popName\":\"\",\"deliveredDate\":\"\",\"destinationTownName\":\"\",\"installPrice\":0,\"collectPrice\":0,\"collectCityName\":\"\",\"collectProvinceName\":\"\",\"receiveProvinceName\":\"广东\",\"customerAddress\":\"广东广州市白云区太和镇龙归镇永兴村龙兴中路张屋北15号502\",\"collectAddress\":\"\",\"orderNo\":\"125796178074\",\"collectTel\":\"\",\"receiveDistrictCode\":\"50258\",\"receiveCityName\":\"广州市\",\"isCollect\":0,\"siteAddress\":\"\",\"orderFromType\":100,\"customerName\":\"张高峰\",\"popCode\":\"\",\"deliverTownName\":\"\",\"collectProvinceCode\":\"\",\"destinationDistrictName\":\"\",\"collectDistrictName\":\"\",\"receiveTownCode\":\"50375\",\"destinationTownCode\":\"\",\"destinationProvinceCode\":\"\",\"collectCityCode\":\"\",\"collectTownCode\":\"\",\"customerTel\":\"13450210491\",\"destinationCityCode\":\"\",\"deliverProvinceCode\":\"\",\"productSecondCategoryName\":\"\",\"deliverDistrictName\":\"\",\"isVerification\":1,\"popAddress\":\"\",\"sumPrice\":0,\"carrierReceiptedDate\":\"\",\"deliverTownCode\":\"\",\"orderStatus\":3100,\"productBrandName\":\"\",\"siteName\":\"啄木鸟维修\",\"receiveCityCode\":\"1601\",\"createOrderDate\":\"2020-08-29 13:39:39\",\"expectAtHomeDate\":\"2020-08-30 00:00:00\",\"popContact\":\"\",\"collectDistrictCode\":\"\",\"collectCode\":\"\",\"destinationCityName\":\"\",\"receiveTownName\":\"太和镇\",\"deliverDistrictCode\":\"\",\"destinationProvinceName\":\"\",\"collectTownName\":\"\",\"packageNum\":0,\"collectTime\":0,\"deliverProvinceName\":\"\",\"siteCode\":\"0238611947\",\"popTel\":\"\",\"productFirstCategoryName\":\"\",\"deliveredFinishDate\":\"\",\"vouchererPrice\":0,\"rejectedDate\":\"\",\"branchlinePrice\":0,\"deliverCityCode\":\"\",\"orderDetail\":\"[{\\\"serviceType\\\":\\\"1\\\",\\\"isFreeInstall\\\":\\\"0\\\",\\\"isPostPay\\\":0,\\\"category1Name\\\":\\\"家用电器\\\",\\\"appointServiceItems\\\":[{\\\"serviceItemId\\\":6,\\\"serviceItemName\\\":\\\"上门维修\\\"}],\\\"expectAtHomeDate\\\":\\\"2020-08-30\\\",\\\"createOrderDate\\\":\\\"2020-08-29 13:39:39\\\",\\\"installPrice\\\":0,\\\"payType\\\":\\\"2\\\",\\\"isNeedInstall\\\":1,\\\"category3Name\\\":\\\"家电维修\\\",\\\"billStatus\\\":15,\\\"goodsName\\\":\\\"家用冰箱检测  家电检测 故障检测 家电清洗 上门服务 家政保洁\\\",\\\"brandNo\\\":\\\"9639\\\",\\\"height\\\":0,\\\"goodsNo\\\":\\\"6009949\\\",\\\"brandName\\\":\\\"京东\\\",\\\"sourceProductName\\\":\\\"\\\",\\\"length\\\":0,\\\"installRemark\\\":\\\"\\\",\\\"weight\\\":0,\\\"volume\\\":0,\\\"isPaid\\\":\\\"2\\\",\\\"goodsCount\\\":1,\\\"venderName\\\":\\\"\\\",\\\"sourceProductSku\\\":\\\"\\\",\\\"afterSalesHandleFlag\\\":2,\\\"venderNo\\\":\\\"\\\",\\\"width\\\":0,\\\"category2Name\\\":\\\"家电服务\\\",\\\"serviceNo\\\":58819563}]\",\"sumVolume\":0,\"receiveProvinceCode\":\"19\",\"logisticsStatus\":0,\"siteContact\":\"\",\"siteTel\":\"\"},{\"receiveDistrictName\":\"桥西区\",\"jdOrderNo\":\"131791691043\",\"destinationDistrictCode\":\"\",\"productCategoryName\":\"\",\"estimateReceiveTime\":0,\"servicesScope\":1,\"deliverAddress\":\"\",\"deliverCityName\":\"\",\"mainlinePrice\":0,\"popName\":\"\",\"deliveredDate\":\"\",\"destinationTownName\":\"\",\"installPrice\":0,\"collectPrice\":0,\"collectCityName\":\"\",\"collectProvinceName\":\"\",\"receiveProvinceName\":\"河北\",\"customerAddress\":\"河北石家庄市桥西区红旗街道滨河街滨河新城24-1-104\",\"collectAddress\":\"\",\"orderNo\":\"131791691043\",\"collectTel\":\"\",\"receiveDistrictCode\":\"42544\",\"receiveCityName\":\"石家庄市\",\"isCollect\":0,\"siteAddress\":\"\",\"orderFromType\":100,\"customerName\":\"王蒙\",\"popCode\":\"\",\"deliverTownName\":\"\",\"collectProvinceCode\":\"\",\"destinationDistrictName\":\"\",\"collectDistrictName\":\"\",\"receiveTownCode\":\"60049\",\"destinationTownCode\":\"\",\"destinationProvinceCode\":\"\",\"collectCityCode\":\"\",\"collectTownCode\":\"\",\"customerTel\":\"19903112543\",\"destinationCityCode\":\"\",\"deliverProvinceCode\":\"\",\"productSecondCategoryName\":\"\",\"deliverDistrictName\":\"\",\"isVerification\":1,\"popAddress\":\"\",\"sumPrice\":0,\"carrierReceiptedDate\":\"\",\"deliverTownCode\":\"\",\"orderStatus\":3100,\"productBrandName\":\"\",\"siteName\":\"啄木鸟维修\",\"receiveCityCode\":\"142\",\"createOrderDate\":\"2020-09-09 06:46:43\",\"expectAtHomeDate\":\"2020-09-10 00:00:00\",\"popContact\":\"\",\"collectDistrictCode\":\"\",\"collectCode\":\"\",\"destinationCityName\":\"\",\"receiveTownName\":\"红旗街道\",\"deliverDistrictCode\":\"\",\"destinationProvinceName\":\"\",\"collectTownName\":\"\",\"packageNum\":0,\"collectTime\":0,\"deliverProvinceName\":\"\",\"siteCode\":\"0238611947\",\"popTel\":\"\",\"productFirstCategoryName\":\"\",\"deliveredFinishDate\":\"\",\"vouchererPrice\":0,\"rejectedDate\":\"\",\"branchlinePrice\":0,\"deliverCityCode\":\"\",\"orderDetail\":\"[{\\\"serviceType\\\":\\\"1\\\",\\\"isFreeInstall\\\":\\\"0\\\",\\\"isPostPay\\\":0,\\\"category1Name\\\":\\\"家用电器\\\",\\\"appointServiceItems\\\":[{\\\"serviceItemId\\\":6,\\\"serviceItemName\\\":\\\"上门维修\\\"}],\\\"expectAtHomeDate\\\":\\\"2020-09-10\\\",\\\"createOrderDate\\\":\\\"2020-09-09 06:46:43\\\",\\\"installPrice\\\":0,\\\"payType\\\":\\\"2\\\",\\\"isNeedInstall\\\":1,\\\"category3Name\\\":\\\"家电维修\\\",\\\"billStatus\\\":15,\\\"goodsName\\\":\\\"家用冰箱检测  家电检测 故障检测 家电清洗 上门服务 家政保洁\\\",\\\"brandNo\\\":\\\"9639\\\",\\\"height\\\":0,\\\"goodsNo\\\":\\\"6009949\\\",\\\"brandName\\\":\\\"京东\\\",\\\"sourceProductName\\\":\\\"\\\",\\\"length\\\":0,\\\"installRemark\\\":\\\"\\\",\\\"weight\\\":0,\\\"volume\\\":0,\\\"isPaid\\\":\\\"2\\\",\\\"goodsCount\\\":1,\\\"venderName\\\":\\\"\\\",\\\"sourceProductSku\\\":\\\"\\\",\\\"afterSalesHandleFlag\\\":1,\\\"venderNo\\\":\\\"\\\",\\\"width\\\":0,\\\"category2Name\\\":\\\"家电服务\\\",\\\"serviceNo\\\":59126132}]\",\"sumVolume\":0,\"receiveProvinceCode\":\"5\",\"logisticsStatus\":0,\"siteContact\":\"\",\"siteTel\":\"\"}]},\"code\":\"0\",\"url\":\"https://api.jdwl.com/routerjson?access_token=225ae2e31be84bfe9fedf1f2532e46cf&app_key=c94ebab8b73e4a65bf36f3c554f490b2&method=jingdong.las.im.hfs.order.search&v=2.0&sign=A5C71C6189454FD7E104C33EB53E72C1&timestamp=2020-09-09+11%3A15%3A00&param_json=[{\\\"token\\\":\\\"3a4f08fd82f24d66e2e13c3787b8e97d\\\",\\\"vendorCode\\\":\\\"0238611947\\\"}]\"}";

        LasImHfsOrderSearchResponse lasImHfsOrderSearchResponse = JSON.parseObject(str, LasImHfsOrderSearchResponse.class);

        PullOrderResult pullOrderResult = parsePullOrderResponse(lasImHfsOrderSearchResponse);
        List<ImPendingOrderDto> jdOrderDTOs = pullOrderResult.getJdOrderDTOs();
        if (jdOrderDTOs == null) {
            System.out.println("null");
        }
        else {
            System.out.println(jdOrderDTOs.size());
        }
    }
}
